﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GrewalCRM.Entities
{
  public class ReportInstallationSummary : BaseEntitiesGrewalCRM
  {
    #region Members  
    private ReffStatus status;
    private int? count;
    private decimal? installerCommisionCR;
    private decimal? installerMaterialCR;
    private decimal? installerAcDR;
    private decimal? dealerAcDR;
    private decimal? dealerAcCR;
    private decimal? dealerDipositCR;
    private decimal? simranAcCR;
    private decimal? simranAcDR;
    private decimal? simranMarginCR;
    #endregion

    #region Constructors
    /// <summary>
    /// Create a new instance using the default constructor
    /// </summary>
    public ReportInstallationSummary() { }
        
    /// <summary> 
    /// Create an object from an existing row of data. This will be used by Gentle to 
    /// construct objects from retrieved rows. 
    /// </summary> 
    public ReportInstallationSummary(ReffStatus status, int? count, decimal? installerCommisionCR, decimal? installerMaterialCR, decimal? installerAcDR, 
                    decimal? dealerAcDR, decimal? dealerAcCR, decimal? dealerDipositCR, decimal? simranAcCR, decimal? simranAcDR, decimal? simranMarginCR)
      : base(status.ID, null, null)
    {
      this.status = status;
      this.count = count;
      this.installerCommisionCR = installerCommisionCR;
      this.installerMaterialCR = installerMaterialCR;
      this.installerAcDR = installerAcDR;
      this.dealerAcDR = dealerAcDR;
      this.dealerAcCR = dealerAcCR;
      this.dealerDipositCR = dealerDipositCR;
      this.simranAcCR = simranAcCR;
      this.simranAcDR = simranAcDR;
      this.simranMarginCR = simranMarginCR;
    }
    #endregion

    #region Public Properties    
    /// <summary>
    /// Property relating to database column StatusName
    /// </summary>    
    public ReffStatus CallStatus
    {
      get { return status; }
      set { IsChanged |= status.ID != value.ID; status = value; }
    }

    /// <summary>
    /// Property relating to database column InstallerAcDR
    /// </summary>
    public int? Count
    {
      get { return count; }
      set { IsChanged |= count != value; count = value; }
    }
    
    /// <summary>
    /// Property relating to database column InstallerCommisionCR
    /// </summary>
    public decimal? InstallerCommisionCR
    {
      get { return installerCommisionCR; }
      set { IsChanged |= installerCommisionCR != value; installerCommisionCR = value; }
    }

    /// <summary>
    /// Property relating to database column InstallerMaterialCR
    /// </summary>
    public decimal? InstallerMaterialCR
    {
      get { return installerMaterialCR; }
      set { IsChanged |= installerMaterialCR != value; installerMaterialCR = value; }
    }

    /// <summary>
    /// Property relating to database column InstallerAcDR
    /// </summary>
    public decimal? InstallerAcDR
    {
      get { return installerAcDR; }
      set { IsChanged |= installerAcDR != value; installerAcDR = value; }
    }

    /// <summary>
    /// Property relating to database column DealerAcDR
    /// </summary>
    public decimal? DealerAcDR
    {
      get { return dealerAcDR; }
      set { IsChanged |= dealerAcDR != value; dealerAcDR = value; }
    }

    /// <summary>
    /// Property relating to database column DealerAcCR
    /// </summary>
    public decimal? DealerAcCR
    {
      get { return dealerAcCR; }
      set { IsChanged |= dealerAcCR != value; dealerAcCR = value; }
    }

    /// <summary>
    /// Property relating to database column DealerDipositCR
    /// </summary>
    public decimal? DealerDipositCR
    {
      get { return dealerDipositCR; }
      set { IsChanged |= dealerDipositCR != value; dealerDipositCR = value; }
    }

    /// <summary>
    /// Property relating to database column SimranAcCR
    /// </summary>
    public decimal? SimranAcCR
    {
      get { return simranAcCR; }
      set { IsChanged |= simranAcCR != value; simranAcCR = value; }
    }

    /// <summary>
    /// Property relating to database column SimranAcDR
    /// </summary>
    public decimal? SimranAcDR
    {
      get { return simranAcDR; }
      set { IsChanged |= simranAcDR != value; simranAcDR = value; }
    }

    /// <summary>
    /// Property relating to database column SimranMarginCR
    /// </summary>
    public decimal? SimranMarginCR
    {
      get { return simranMarginCR; }
      set { IsChanged |= simranMarginCR != value; simranMarginCR = value; }
    }
    #endregion
  }
}
